﻿@model EmrDatastructure.EmrProblem

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>EmrProblem</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Snomed_CT)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Snomed_CT)
            @Html.ValidationMessageFor(model => model.Snomed_CT)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Status)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Status)
            @Html.ValidationMessageFor(model => model.Status)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateDiagnosed)
        </div>
        <div class="editor-field">
            @* @Html.EditorFor(model => model.DateDiagnosed) *@
            <input class="text-box single-line" data-val="true" data-val-required="The DateDiagnosed field is required." id="DateDiagnosed" name="DateDiagnosed" type="text" value="" />
            @Html.ValidationMessageFor(model => model.DateDiagnosed)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script type="text/javascript">
    $(function () {
        $("#DateDiagnosed").datepicker({
            showOn: "button",
            buttonImage: '@Url.Content("~/Content/images/calendar.gif")',
            buttonImageOnly: true
        });
    });
    $(function () {
        $("#Description").autocomplete({
            source: '@Url.Action("SnowMedDescription", "Lookups")',
            minLength: 1
        });
    });
</script>